<?php
class Singleton{
	private static $instance = null;

	private function __construct(){
	}

	private function __clone(){}

	public static function getInstance(){
		if(is_null(self::$instance)){
			self::$instance = new Singleton();
		}
		return self::$instance;
	}
	
	public function sayHello(){
		echo 'Hello!';
	}
}

Singleton::getInstance()->sayHello();